package com.asd.map.mapper;

import com.asd.map.entity.Surface_style;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author
 * @createtime 2021-09-02 8:47
 * @description
 */
@Mapper
@Component
public interface Surface_styleMapper extends BaseMapper<Surface_style> {

    @Delete("delete from surface_style where applyId=#{applyId} AND did =#{did}")
    void removeById(@Param("applyId") String applyId,@Param("did") String did);

    @Select("select * from surface_style where applyId=#{applyId} AND did=#{did}")
    List<Surface_style> findByApplyId(@Param("applyId") String applyId,@Param("did")String did);

    @Delete("delete from surface_style where applyId = #{applyId}")
    void deleteByApplyId(@Param("applyId")String applyId);

    @Select("select * from surface_style where applyId = #{id}")
    List<Surface_style> getByApplyId(@Param("id")String id);

}
